package panda.client.ui.widgets;

import panda.client.JSNI;

import com.google.gwt.user.client.ui.HTML;

/**
 * No longer used.  Singleton for logging object in html.  Shows up inside main canvas.
 * @author zane.tian@gmail.com
 */
@Deprecated
public class CanvasLog extends HTML {
	private static CanvasLog log = new CanvasLog("");
	
	private CanvasLog(String html) {
		super(html);
		JSNI.disableSelection(getElement());
	}

	public static CanvasLog get() {
		return log;
	}

	public void log(String html) {
		setHTML(html + "<br>" + getHTML());
	}

	public void clearLog() {
		setHTML("");
	}
}